///
/// All web methods need to be defined with the WebMethod tag.
///
[System.Web.Services.WebMethod()]
public static string GetRecordDescription(int MyRecordID)
{
// For INTEGER Id's
string whereStr = " ${Record ID} = " + MyRecordID;
// For STRING Id's, comment out above line and uncomment below line.
// string whereStr = " ${Record ID} = '" + MyRecordID + "'";
${${Table Name}RecordClassName} selectedRecord = ${${Table Name}ClassName}.GetRecord(whereStr);
// In this example the description of the selected record is retrieved
string content = "The description for the selected record is " + selectedRecord.${Description Field};
return content;
}
|